<template>
  <div class="page-changeCity">
    <el-row>
      <province />
    </el-row>
    <el-row>
      热门城市
    </el-row>
    <el-row>
      <Hotcity title="热门城市：" :list="hotList" />
    </el-row>
    <el-row>
      <Hotcity title="最近访问：" :list="rencentList" />
    </el-row>
    <el-row>
      <Category />
    </el-row>
  </div>
</template>
<script>
import Province from '@/components/changeCity/province.vue'
import Hotcity from '@/components/changeCity/hotcity.vue'
import Category from '@/components/changeCity/categroy.vue'
import api from '@/api/index.js'
export default {
  data () {
    return {
      hotList: ['成都', '济南', '青岛', '上海', '广州', '杭州'],
      rencentList: ['上海', '广州', '杭州', '株洲', '台州']
    }
  },
  // created () {
  //   api.getHotCity().then(res => {
  //     this.hotList = res.data.data.map((item) => item.name)
  //   })
  //   api.getRecentCity().then(res => {
  //     this.rencentList = res.data.data.map((item) => item.name)
  //   })
  // },
  components: {
    Province,
    Hotcity,
    Category
  }
}
</script>
